from django.db import models

# Create your models here.
class City(models.Model):
    areacode = models.CharField(db_column='areaCode', max_length=50)  # Field name made lowercase.
    name = models.CharField(max_length=20)
    level = models.IntegerField(blank=True, null=True)
    citycode = models.CharField(db_column='cityCode', max_length=50, blank=True, null=True)  # Field name made lowercase.
    center = models.CharField(max_length=50, blank=True, null=True)
    parentid = models.IntegerField(db_column='parentId', blank=True, null=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'city'

class Address(models.Model):
    receiver = models.CharField(max_length=20)
    province_id = models.IntegerField()
    city_id = models.IntegerField()
    district_id = models.IntegerField()
    place = models.CharField(max_length=20)
    phone = models.CharField(max_length=11)
    class Meta:
        db_table = 'address'